Dani Grant's profile

Predator and Prey Game

I made a game! As you can probably guess by the chomping sounds, the goal is to use the arrow keys to move the player (in blue) to catch the computer controlled character (in black). 
 
The computer player AI knows that the furthest distance that it can possibly be from the player is half of the diagnol of the screen. It's constantly checking its distance from the player to see whether it is at that optimal distance, and if it is not, it moves to get itself to that sweet spot.
 
In the hard version, there's an added trickiness. When you, the predator, come within a certain distance of the computer character, the computer character essentially flips a coin to see whether it will continue to play fair, or whether it will use its powers of apparition to jump to another part of the screen.
 
The score and elapsed time are being counted in the upper left corner.
One of my favorite parts of building this game (built in Processing js) was designing the characters. I'd like you to meet them.
 
Here is the player. He has a face-view and a side view, as well as a view with his mouth open which activates just as he's about to chomp down on the computer controlled character.
This is the computer controlled character. I originally made a side view for him as well, but I thought he was cooler when you could always tell that he was a cyclops.
The best part: I made my own joystick so that I could play my game on my own joystick! 
Predator and Prey Game
Published:

Predator and Prey Game

Game built in Processing.

Published: